package com.example.wechattakeaway.mapper;

import com.example.wechattakeaway.entity.MerNotice;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface MerNoticeMapper {
    //删除公告
    int deleteByPrimaryKey(Integer noticeId);

    //插入公告
    int insert(MerNotice merNotice);


    int insertSelective(MerNotice record);

    //根据id查询公告
    MerNotice selectByPrimaryKey(Integer noticeId);

    //修改公告
    int updateByPrimaryKeySelective(MerNotice merNotice);

    int updateByPrimaryKey(MerNotice record);

    //根据商家id查询所有公告列表
    List<MerNotice> selectAllByMerId(Integer merchantId);

    //根据商家id和状态查询对应允许显示的公告
    List<MerNotice> selectAllowNotices(MerNotice merNotice);
}